using UnityEngine;

public class Indestructible : MonoBehaviour
{
	private string suffix = "_INDESTRUCTIBLE_";

	private void Start()
	{
		if ((bool)GameObject.Find(GetGameObjectBaseName() + suffix))
		{
			Object.Destroy(base.gameObject);
			return;
		}
		Object.DontDestroyOnLoad(base.gameObject);
		base.gameObject.name = GetGameObjectBaseName() + suffix;
	}

	private void Update()
	{
	}

	private string GetGameObjectBaseName()
	{
		return base.gameObject.name.Replace(suffix, string.Empty);
	}
}
